var num = 0;
var moreshang = document.querySelector('.moreshang');
//上一页
moreshang.addEventListener('click', () => {
    num--;
    if (num == -1) {
        num = 0;
        moreshang.style.cursor = 'not-allowed';
        return;
    }
    else {
        moreshang.style.cursor = 'pointer';
    }
    var moregoodsbox = document.querySelector('.moregoodsbox');
    moregoodsbox.style.left = parseInt(moregoodsbox.style.left) + 300 + 'px';

})
// 下一页
var morexia = document.querySelector('.morexia');
morexia.addEventListener('click', () => {
    num++;
    var moregoodsbox = document.querySelector('.moregoodsbox');
    if (num == 3) {
        num = 2;
        morexia.style.cursor = 'not-allowed';
        return;
    }
    else {
        morexia.style.cursor = 'pointer';
    }

    moregoodsbox.style.left = parseInt(moregoodsbox.style.left) - 300 + 'px';

})